<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>TP1-Algo: Référence de la classe TP1::FilePieces</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">TP1-Algo
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Généré par Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="namespaces.html"><span>Espaces&#160;de&#160;nommage</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Fichiers</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Liste&#160;des&#160;classes</span></a></li>
      <li><a href="functions.html"><span>Membres&#160;de&#160;classe</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_t_p1_1_1_file_pieces.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Fonctions membres publiques</a> &#124;
<a href="#pri-attribs">Attributs privés</a> &#124;
<a href="class_t_p1_1_1_file_pieces-members.html">Liste de tous les membres</a>  </div>
  <div class="headertitle">
<div class="title">Référence de la classe TP1::FilePieces</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_file_pieces_8h_source.html">FilePieces.h</a>&gt;</code></p>
<div class="dynheader">
Graphe de collaboration de TP1::FilePieces:</div>
<div class="dyncontent">
<div class="center"><img src="class_t_p1_1_1_file_pieces__coll__graph.png" border="0" usemap="#_t_p1_1_1_file_pieces_coll__map" alt="Collaboration graph"/></div>
<map name="_t_p1_1_1_file_pieces_coll__map" id="_t_p1_1_1_file_pieces_coll__map">
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">légende</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Fonctions membres publiques</h2></td></tr>
<tr class="memitem:a5296be1ba7aaa8c4eddaa9b3e22aae28"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#a5296be1ba7aaa8c4eddaa9b3e22aae28">FilePieces</a> ()</td></tr>
<tr class="memdesc:a5296be1ba7aaa8c4eddaa9b3e22aae28"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructeur par défaut  <a href="#a5296be1ba7aaa8c4eddaa9b3e22aae28">Plus de détails...</a><br/></td></tr>
<tr class="separator:a5296be1ba7aaa8c4eddaa9b3e22aae28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a349de724ce0225414c7048bf468b5cb3"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#a349de724ce0225414c7048bf468b5cb3">~FilePieces</a> ()</td></tr>
<tr class="memdesc:a349de724ce0225414c7048bf468b5cb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructeur  <a href="#a349de724ce0225414c7048bf468b5cb3">Plus de détails...</a><br/></td></tr>
<tr class="separator:a349de724ce0225414c7048bf468b5cb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0aace4eb9f5977af805ae387f50ee20"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#ac0aace4eb9f5977af805ae387f50ee20">FilePieces</a> (const <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> &amp;)</td></tr>
<tr class="memdesc:ac0aace4eb9f5977af805ae387f50ee20"><td class="mdescLeft">&#160;</td><td class="mdescRight">constructeur copie  <a href="#ac0aace4eb9f5977af805ae387f50ee20">Plus de détails...</a><br/></td></tr>
<tr class="separator:ac0aace4eb9f5977af805ae387f50ee20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c4b7221d4f4f10b153b0da613fe99f7"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#a2c4b7221d4f4f10b153b0da613fe99f7">operator=</a> (const <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> &amp;source)</td></tr>
<tr class="memdesc:a2c4b7221d4f4f10b153b0da613fe99f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">surcharge de l'opérateur =  <a href="#a2c4b7221d4f4f10b153b0da613fe99f7">Plus de détails...</a><br/></td></tr>
<tr class="separator:a2c4b7221d4f4f10b153b0da613fe99f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8feb7b1ce9d120e62bab1325b8d1e04"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#aa8feb7b1ce9d120e62bab1325b8d1e04">enfilePiece</a> (const std::string &amp;nomPiece, int distanceDuDebut)</td></tr>
<tr class="memdesc:aa8feb7b1ce9d120e62bab1325b8d1e04"><td class="mdescLeft">&#160;</td><td class="mdescRight">ajoute une pièce à la fin d'une file de pièces  <a href="#aa8feb7b1ce9d120e62bab1325b8d1e04">Plus de détails...</a><br/></td></tr>
<tr class="separator:aa8feb7b1ce9d120e62bab1325b8d1e04"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe8a43d49f3e518d438891d3c15809c7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#afe8a43d49f3e518d438891d3c15809c7">defilePiece</a> (std::string &amp;nomPieceRetiree, int &amp;distanceDuDebut)</td></tr>
<tr class="memdesc:afe8a43d49f3e518d438891d3c15809c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retire une pièce du début d'une file.  <a href="#afe8a43d49f3e518d438891d3c15809c7">Plus de détails...</a><br/></td></tr>
<tr class="separator:afe8a43d49f3e518d438891d3c15809c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28ec1fa0edf8ef1c110a9678126615af"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#a28ec1fa0edf8ef1c110a9678126615af">estVideFile</a> () const </td></tr>
<tr class="memdesc:a28ec1fa0edf8ef1c110a9678126615af"><td class="mdescLeft">&#160;</td><td class="mdescRight">vérifie si la file est vide  <a href="#a28ec1fa0edf8ef1c110a9678126615af">Plus de détails...</a><br/></td></tr>
<tr class="separator:a28ec1fa0edf8ef1c110a9678126615af"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Attributs privés</h2></td></tr>
<tr class="memitem:a9c7e0339bdeddf6b72407f212a846a66"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t_p1_1_1_chemin.html">Chemin</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a></td></tr>
<tr class="separator:a9c7e0339bdeddf6b72407f212a846a66"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Description détaillée</h2>
<div class="textblock">
<p>Définition à la ligne <a class="el" href="_file_pieces_8h_source.html#l00021">21</a> du fichier <a class="el" href="_file_pieces_8h_source.html">FilePieces.h</a>.</p>
</div><h2 class="groupheader">Documentation des constructeurs et destructeur</h2>
<a class="anchor" id="a5296be1ba7aaa8c4eddaa9b3e22aae28"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TP1::FilePieces::FilePieces </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>constructeur par défaut </p>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00017">17</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    :<a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>()</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    {}</div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a349de724ce0225414c7048bf468b5cb3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TP1::FilePieces::~FilePieces </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>destructeur </p>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00024">24</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>

<p>Références <a class="el" href="_file_pieces_8h_source.html#l00072">ch</a>, et <a class="el" href="_chemin_8cpp_source.html#l00028">TP1::Chemin::~Chemin()</a>.</p>

<p>Référencé par <a class="el" href="_testeur_file_pieces_8cpp_source.html#l00031">TEST()</a>.</p>
<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    {</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;        <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#ab4692b607735342b10cdf8455baf4511">~Chemin</a>();</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    }</div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_ab4692b607735342b10cdf8455baf4511"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#ab4692b607735342b10cdf8455baf4511">TP1::Chemin::~Chemin</a></div><div class="ttdeci">virtual ~Chemin()</div><div class="ttdoc">Détruction de la liste, libère l&#39;espace mémoire allouée avec la méthode _detruire. </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00028">Chemin.cpp:28</a></div></div>
</div><!-- fragment -->
<p><div class="dynheader">
Voici le graphe d'appel pour cette fonction :</div>
<div class="dyncontent">
<div class="center"><img src="class_t_p1_1_1_file_pieces_a349de724ce0225414c7048bf468b5cb3_cgraph.png" border="0" usemap="#class_t_p1_1_1_file_pieces_a349de724ce0225414c7048bf468b5cb3_cgraph" alt=""/></div>
<map name="class_t_p1_1_1_file_pieces_a349de724ce0225414c7048bf468b5cb3_cgraph" id="class_t_p1_1_1_file_pieces_a349de724ce0225414c7048bf468b5cb3_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="ac0aace4eb9f5977af805ae387f50ee20"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TP1::FilePieces::FilePieces </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>constructeur copie </p>
<dl class="section post"><dt>Postcondition</dt><dd>nouvelle <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> identique à celle passée en paramètre (copie profonde du chemin) </dd></dl>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00034">34</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>

<p>Références <a class="el" href="_file_pieces_8h_source.html#l00072">ch</a>.</p>
<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a> = source.ch;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    }</div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentation des fonctions membres</h2>
<a class="anchor" id="afe8a43d49f3e518d438891d3c15809c7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TP1::FilePieces::defilePiece </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>nomPieceRetiree</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>distanceDuDebut</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retire une pièce du début d'une file. </p>
<p>Place le nom de la pièce retirée dans une chaine de caractères passée en paramètre. Place la distance du début de cette même pièce dans un entier passé en paramètre. </p>
<dl class="section pre"><dt>Précondition</dt><dd>la file ne doit pas être vide. </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>la taille du chemin de la file est réduite de 1. la pièce est supprimée. les données (nom et distance) sont enregistrées dans les variables passés en paramètre. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">logic_error</td><td>si la file est vide. </td></tr>
  </table>
  </dd>
</dl>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00065">65</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>

<p>Références <a class="el" href="_file_pieces_8h_source.html#l00072">ch</a>, <a class="el" href="_chemin_8cpp_source.html#l00154">TP1::Chemin::getDistanceDuDebut()</a>, <a class="el" href="_chemin_8cpp_source.html#l00144">TP1::Chemin::getNomPiece()</a>, <a class="el" href="_chemin_8cpp_source.html#l00101">TP1::Chemin::retirePiece()</a>, et <a class="el" href="_chemin_8cpp_source.html#l00134">TP1::Chemin::tailleChemin()</a>.</p>

<p>Référencé par <a class="el" href="_labyrinthe_8cpp_source.html#l00383">TP1::Labyrinthe::solutionner()</a>, et <a class="el" href="_testeur_file_pieces_8cpp_source.html#l00031">TEST()</a>.</p>
<div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <span class="comment">//Une exception logic_error devra être levée si la file est vide.</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#a4460a510916bbb62780133e3126474b4">tailleChemin</a>()==0)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;            <span class="keywordflow">throw</span> std::logic_error(<span class="stringliteral">&quot;defilePiece: action invalide, la file est vide.&quot;</span>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        }</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        {</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            <span class="comment">//avant, on doit conserver le nom de la piece dans nomPieceRetiree</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;                    <span class="comment">//et la distance du début dans distanceDuDebut</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            nomPieceRetiree = <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#ac2e61bc1f6dcc5fce4ad7c1c292adaf8">getNomPiece</a>();</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            distanceDuDebut = <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#a7fffa5345ea80a73e85d8c2f4a012875">getDistanceDuDebut</a>();</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            <span class="comment">//on utilise Chemin::retirePiece pour retirer la premire piece d&#39;un chemin</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#a830e30dc2bb1bae8a47a792bec69281d">retirePiece</a>(1);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    }</div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_ac2e61bc1f6dcc5fce4ad7c1c292adaf8"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#ac2e61bc1f6dcc5fce4ad7c1c292adaf8">TP1::Chemin::getNomPiece</a></div><div class="ttdeci">const std::string &amp; getNomPiece() const </div><div class="ttdoc">obtenir le nom de la pièce du début d&#39;un chemin </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00144">Chemin.cpp:144</a></div></div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_a4460a510916bbb62780133e3126474b4"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#a4460a510916bbb62780133e3126474b4">TP1::Chemin::tailleChemin</a></div><div class="ttdeci">int tailleChemin() const </div><div class="ttdoc">retourne le nombre de pièce qu&#39;il y a dans le chemin </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00134">Chemin.cpp:134</a></div></div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_a7fffa5345ea80a73e85d8c2f4a012875"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#a7fffa5345ea80a73e85d8c2f4a012875">TP1::Chemin::getDistanceDuDebut</a></div><div class="ttdeci">int getDistanceDuDebut() const </div><div class="ttdoc">obtenir la distance du début de la pièce au début d&#39;un chemin </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00154">Chemin.cpp:154</a></div></div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_a830e30dc2bb1bae8a47a792bec69281d"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#a830e30dc2bb1bae8a47a792bec69281d">TP1::Chemin::retirePiece</a></div><div class="ttdeci">void retirePiece(int numPiece)</div><div class="ttdoc">Permet de supprimer une pièce à l&#39;indice donnée en argument. </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00101">Chemin.cpp:101</a></div></div>
</div><!-- fragment -->
<p><div class="dynheader">
Voici le graphe d'appel pour cette fonction :</div>
<div class="dyncontent">
<div class="center"><img src="class_t_p1_1_1_file_pieces_afe8a43d49f3e518d438891d3c15809c7_cgraph.png" border="0" usemap="#class_t_p1_1_1_file_pieces_afe8a43d49f3e518d438891d3c15809c7_cgraph" alt=""/></div>
<map name="class_t_p1_1_1_file_pieces_afe8a43d49f3e518d438891d3c15809c7_cgraph" id="class_t_p1_1_1_file_pieces_afe8a43d49f3e518d438891d3c15809c7_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa8feb7b1ce9d120e62bab1325b8d1e04"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TP1::FilePieces::enfilePiece </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>nomPiece</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>distanceDuDebut</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ajoute une pièce à la fin d'une file de pièces </p>
<dl class="section post"><dt>Postcondition</dt><dd>le chemin de la file est augmenté de 1, la pièce est ajoutée. </dd></dl>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00054">54</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>

<p>Références <a class="el" href="_chemin_8cpp_source.html#l00077">TP1::Chemin::ajoutePiece()</a>, et <a class="el" href="_file_pieces_8h_source.html#l00072">ch</a>.</p>

<p>Référencé par <a class="el" href="_labyrinthe_8cpp_source.html#l00383">TP1::Labyrinthe::solutionner()</a>, et <a class="el" href="_testeur_file_pieces_8cpp_source.html#l00031">TEST()</a>.</p>
<div class="fragment"><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#aac82baa7378ac24d26bcb4096c60ac16">ajoutePiece</a>(nomPiece, distanceDuDebut);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    }</div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_aac82baa7378ac24d26bcb4096c60ac16"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#aac82baa7378ac24d26bcb4096c60ac16">TP1::Chemin::ajoutePiece</a></div><div class="ttdeci">void ajoutePiece(const std::string &amp;nomPiece, int distanceDuDebut)</div><div class="ttdoc">Ajoute le nom d&#39;une pièce avec sa distance au début,. </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00077">Chemin.cpp:77</a></div></div>
</div><!-- fragment -->
<p><div class="dynheader">
Voici le graphe d'appel pour cette fonction :</div>
<div class="dyncontent">
<div class="center"><img src="class_t_p1_1_1_file_pieces_aa8feb7b1ce9d120e62bab1325b8d1e04_cgraph.png" border="0" usemap="#class_t_p1_1_1_file_pieces_aa8feb7b1ce9d120e62bab1325b8d1e04_cgraph" alt=""/></div>
<map name="class_t_p1_1_1_file_pieces_aa8feb7b1ce9d120e62bab1325b8d1e04_cgraph" id="class_t_p1_1_1_file_pieces_aa8feb7b1ce9d120e62bab1325b8d1e04_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a28ec1fa0edf8ef1c110a9678126615af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TP1::FilePieces::estVideFile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>vérifie si la file est vide </p>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00087">87</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>

<p>Références <a class="el" href="_file_pieces_8h_source.html#l00072">ch</a>, et <a class="el" href="_chemin_8cpp_source.html#l00134">TP1::Chemin::tailleChemin()</a>.</p>

<p>Référencé par <a class="el" href="_labyrinthe_8cpp_source.html#l00383">TP1::Labyrinthe::solutionner()</a>, et <a class="el" href="_testeur_file_pieces_8cpp_source.html#l00026">TEST()</a>.</p>
<div class="fragment"><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    {</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="comment">//utiliser ch.tailleChemin() == 0</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a>.<a class="code" href="class_t_p1_1_1_chemin.html#a4460a510916bbb62780133e3126474b4">tailleChemin</a>()==0)</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        {</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        }</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div>
<div class="ttc" id="class_t_p1_1_1_chemin_html_a4460a510916bbb62780133e3126474b4"><div class="ttname"><a href="class_t_p1_1_1_chemin.html#a4460a510916bbb62780133e3126474b4">TP1::Chemin::tailleChemin</a></div><div class="ttdeci">int tailleChemin() const </div><div class="ttdoc">retourne le nombre de pièce qu&#39;il y a dans le chemin </div><div class="ttdef"><b>Definition:</b> <a href="_chemin_8cpp_source.html#l00134">Chemin.cpp:134</a></div></div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
</div><!-- fragment -->
<p><div class="dynheader">
Voici le graphe d'appel pour cette fonction :</div>
<div class="dyncontent">
<div class="center"><img src="class_t_p1_1_1_file_pieces_a28ec1fa0edf8ef1c110a9678126615af_cgraph.png" border="0" usemap="#class_t_p1_1_1_file_pieces_a28ec1fa0edf8ef1c110a9678126615af_cgraph" alt=""/></div>
<map name="class_t_p1_1_1_file_pieces_a28ec1fa0edf8ef1c110a9678126615af_cgraph" id="class_t_p1_1_1_file_pieces_a28ec1fa0edf8ef1c110a9678126615af_cgraph">
</map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a2c4b7221d4f4f10b153b0da613fe99f7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> &amp; TP1::FilePieces::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>surcharge de l'opérateur = </p>
<dl class="section post"><dt>Postcondition</dt><dd><a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a> identique à celle en paramètre. (copie profonde du chemin) </dd></dl>

<p>Définition à la ligne <a class="el" href="_file_pieces_8cpp_source.html#l00043">43</a> du fichier <a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a>.</p>

<p>Références <a class="el" href="_file_pieces_8h_source.html#l00072">ch</a>.</p>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    {</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <a class="code" href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">ch</a> = source.ch;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    }</div>
<div class="ttc" id="class_t_p1_1_1_file_pieces_html_a9c7e0339bdeddf6b72407f212a846a66"><div class="ttname"><a href="class_t_p1_1_1_file_pieces.html#a9c7e0339bdeddf6b72407f212a846a66">TP1::FilePieces::ch</a></div><div class="ttdeci">Chemin ch</div><div class="ttdef"><b>Definition:</b> <a href="_file_pieces_8h_source.html#l00072">FilePieces.h:72</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Documentation des données membres</h2>
<a class="anchor" id="a9c7e0339bdeddf6b72407f212a846a66"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t_p1_1_1_chemin.html">Chemin</a> TP1::FilePieces::ch</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Définition à la ligne <a class="el" href="_file_pieces_8h_source.html#l00072">72</a> du fichier <a class="el" href="_file_pieces_8h_source.html">FilePieces.h</a>.</p>

<p>Référencé par <a class="el" href="_file_pieces_8cpp_source.html#l00065">defilePiece()</a>, <a class="el" href="_file_pieces_8cpp_source.html#l00054">enfilePiece()</a>, <a class="el" href="_file_pieces_8cpp_source.html#l00087">estVideFile()</a>, <a class="el" href="_file_pieces_8cpp_source.html#l00034">FilePieces()</a>, <a class="el" href="_file_pieces_8cpp_source.html#l00043">operator=()</a>, et <a class="el" href="_file_pieces_8cpp_source.html#l00024">~FilePieces()</a>.</p>

</div>
</div>
<hr/>La documentation de cette classe a été générée à partir des fichiers suivants :<ul>
<li><a class="el" href="_file_pieces_8h_source.html">FilePieces.h</a></li>
<li><a class="el" href="_file_pieces_8cpp_source.html">FilePieces.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_t_p1.html">TP1</a></li><li class="navelem"><a class="el" href="class_t_p1_1_1_file_pieces.html">FilePieces</a></li>
    <li class="footer">Généré le Dimanche 8 Juin 2014 19:37:05 pour TP1-Algo par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
